package com.start.common.dataImport;

import org.springframework.stereotype.Component;

@Component
public class DataExchangeService {
    private DataExchangeQueue queue = DataExchangeQueue.getQueue();
    private volatile boolean executeState = false;

    public boolean executeState() {
        return executeState;
    }

    public void execute(DataExchangeEntity queue) {

    }

    private void executeDataImport() {
        if (queue.size() < 1) {
            return;
        }
        final DataExchangeEntity out = queue.out();
        DataExchangeExecute execute = DataExchangeExecute.getExecute();
        try {
            execute.execute(out);
        } catch (Exception e) {
            e.printStackTrace();
            return;
        }
    }

}
